package com.decelo.jpa.kafka;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class Producer {
    @Resource
    private KafkaTemplate<String,String> kafkaTemplate;

    public void sendMess(String topic,String data){
        kafkaTemplate.send(topic,data);
    }

}
